package grg.learn.compose.wanandroid.config

import grg.learn.compose.wanandroid.data.repo.IndexRepository

interface AppRepositoryProvider {

    fun indexRepository(): IndexRepository

    companion object : AppRepositoryProvider {

        private val api by lazy {
            WanAndroidApiService.INSTANCE
        }

        override fun indexRepository(): IndexRepository {
            return IndexRepository(api)
        }
    }

}